/****************************************************************************/
/*  File:       ModuleDescriptor.java                                       */
/*  Author:     F. Georges - fgeorges.org                                   */
/*  Date:       2009-06-15                                                  */
/*  Tags:                                                                   */
/*      Copyright (c) 2009 Florent Georges (see end of file.)               */
/* ------------------------------------------------------------------------ */


package org.expath.pkg.saxon;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * Represent a module (as in a package descriptor.)
 *
 * @author Florent Georges
 * @date   2009-06-15
 */
public class ModuleDescriptor
{
    public String getName()
    {
        return myName;
    }

    public void setName(String name)
    {
        myName = name;
    }

    public String getVersion()
    {
        return myVersion;
    }

    public void setVersion(String version)
    {
        myVersion = version;
    }

    public String getTitle()
    {
        return myTitle;
    }

    public void setTitle(String title)
    {
        myTitle = title;
    }

    public String getCatalogPrefix()
    {
        return myCatPrefix;
    }

    public void setCatalogPrefix(String prefix)
    {
        myCatPrefix = prefix;
    }

    public byte[] getCatalog()
    {
        return myCatalog;
    }

    public void setCatalog(byte[] cat)
    {
        myCatalog = cat;
    }

    public void addStylesheet(StylesheetDescriptor sheet)
    {
        mySheets.add(sheet);
    }

    public Iterator<StylesheetDescriptor> stylesheets()
    {
        return mySheets.iterator();
    }

    public void addWrapper(StylesheetDescriptor wrapper)
    {
        myWrappers.add(wrapper);
    }

    public Iterator<StylesheetDescriptor> wrappers()
    {
        return myWrappers.iterator();
    }

    public void addFunctionClass(String fun)
    {
        myFunctions.add(fun);
    }

    public Iterator<String> functionClasses()
    {
        return myFunctions.iterator();
    }

    public void addLibraryClass(String lib)
    {
        myLibraries.add(lib);
    }

    public Iterator<String> libraryClasses()
    {
        return myLibraries.iterator();
    }

    public void addDependency(SaxonDepDescriptor dep)
    {
        myDeps.add(dep);
    }

    public Iterator<SaxonDepDescriptor> dependencies()
    {
        return myDeps.iterator();
    }

    private String myName;
    private String myVersion;
    private String myTitle;
    private String myCatPrefix;
    private byte[] myCatalog;
    private List<StylesheetDescriptor> mySheets    = new ArrayList<StylesheetDescriptor>();
    private List<StylesheetDescriptor> myWrappers  = new ArrayList<StylesheetDescriptor>();
    private List<String>               myFunctions = new ArrayList<String>();
    private List<String>               myLibraries = new ArrayList<String>();
    private List<SaxonDepDescriptor>   myDeps      = new ArrayList<SaxonDepDescriptor>();
}


/* ------------------------------------------------------------------------ */
/*  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT.               */
/*                                                                          */
/*  The contents of this file are subject to the Mozilla Public License     */
/*  Version 1.0 (the "License"); you may not use this file except in        */
/*  compliance with the License. You may obtain a copy of the License at    */
/*  http://www.mozilla.org/MPL/.                                            */
/*                                                                          */
/*  Software distributed under the License is distributed on an "AS IS"     */
/*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See    */
/*  the License for the specific language governing rights and limitations  */
/*  under the License.                                                      */
/*                                                                          */
/*  The Original Code is: all this file.                                    */
/*                                                                          */
/*  The Initial Developer of the Original Code is Florent Georges.          */
/*                                                                          */
/*  Contributor(s): none.                                                   */
/* ------------------------------------------------------------------------ */
